package com.cctv.product.exception;

import com.cctv.product.enums.ResultEnum;

/**
 * @Author: cctv
 * @Date: 2019/6/6 14:25
 */
public class ProductException extends RuntimeException {
    private Integer code;

    public ProductException(Integer code, String messsage) {
        super(messsage);
        this.code = code;
    }
    public ProductException(ResultEnum resultEnum){
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();

    }
}
